It has been known in the past to arrange a catalyst and exhaust sensor (air-fuel ratio sensor, NOX sensor, etc.,) in an exhaust passage of an internal combustion engine and control an air-fuel ratio of exhaust gas flowing into the catalyst based on an output of the exhaust sensor so as to keep the exhaust emission from deteriorating. For example, in the internal combustion engine described in PLT 1, a non-lean operation where the air-fuel ratio is the stoichiometric air-fuel ratio or rich is performed, and the rich degree of the air-fuel ratio is made smaller when the output value of the NOX sensor reaches a predetermined value or more so as to keep down the amount of discharge of the ammonia produced at the catalyst.